from p import Stack


def divideBy2(decNumber, base):

    digits = "0123456789ABCDEF"

    remstack = Stack()
    
    while decNumber > 0:
        rem = decNumber % base
        remstack.push(rem)
        decNumber = decNumber // base

    binString = ""

    while not remstack.isEmpty():
        binString = binString + digits[remstack.pop()]

    return binString

print(divideBy2(25, 2))
print(divideBy2(25, 16))